package file;

import java.io.File;

/*
    将当前项目目录下的test1.txt-test100.txt文件删除
 */
public class Test2 {
    public static void main(String[] args) {
        for (int i = 1; i <= 100; i++) {
            File file = new File("test" + i + ".txt");
            file.delete();
            System.out.println("文件删除成功");
        }
    }
}
